function z = genmat(x)
% convert the social network summary into a matrix of with appropriate
% delta-c values z
% x is the given array
z = zeros(20, 20);
for k = 1:size(x, 1),
    i = round(x(k,5)/0.05)+1;
    j = round(x(k,6)/0.05)+1;
    %[v, t] = max(x(k,13:22));
    [v, t] = max(x(k,11:21));
%     if (t == 2) t = 3;
%     elseif (t == 3) t = 5;
%     elseif (t == 4) t = 7;
%     elseif (t == 5) t = 2;
%     elseif (t == 6) t = 4;
%     end
     z(j, i) = t;
%      z(i, j) = t;
end
diary on
z
diary off
